package com.invengo.module_check.ui.fragment.feature;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.ViewGroup;

import androidx.annotation.Nullable;

import com.invengo.library_rfid.entity.TagInfo;
import me.goldze.mvvmhabit.bus.LiveDataBus;
import com.invengo.module_check.BR;
import com.invengo.module_check.R;
import com.invengo.module_check.databinding.FragmentFeatureBinding;

import me.goldze.mvvmhabit.base.BaseFragment;

/**
 * @author buoker
 * @version 1.0.0
 * @date 2023/10/24
 * @className java.lang.String
 */
public class FeatureFragment extends BaseFragment<FragmentFeatureBinding, FeatureViewModel> {

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }

    @Override
    public int initContentView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return R.layout.fragment_feature;
    }

    @Override
    public void initData() {
        super.initData();
    }

    @Override
    public void onPause() {
        super.onPause();
        viewModel.saveFeature();
    }

    @Override
    public void initViewObservable() {
        LiveDataBus.get()
                .with("key_test", TagInfo.class)
                .observe(this, info -> {

                });
    }
}
